// Dinh nghia moi truong du lieu trong *.wav file.

#ifndef WAVE_FILE_H
#define WAVE_FILE_H


// Toan bo phan header dai 36 bytes
// chunk size = 36 + data chunk size
// header cua wav file 
typedef struct{
	char riff_string[4];         // Xau chi dinh: 'RIFF' 
	long wave_file_length;	// co do dai 4 bytes

	char wave_string[4];         // Xau chi dinh: 'WAVE' 

	char fmt_string[4];          // Xau chi dinh: 'fmt ' 
	long pcm_header_len;     
	short wave_file_format_tag;
	short number_of_channels;      // (1=mono); (2=stereo) 
	long number_of_samples_per_second;
	long nAvgBytesPerSec;
	short nBlockAlign;      
	short number_of_bits_per_sample;
}   WAV_FILE_HEADER;

#define MAX_NUMBER_OF_DATA_CHUNKS 10   
// header cua data chunk
typedef struct{
	char data_string[4];            // Xau chi dinh 'data'. Neu khac di thi co the la file da duoc nen
	long data_chunk_length;
	//   unsigned char *data; 
}   DATA_CHUNK_HEADER;

#endif